<h1>Listing budgets</h1>

<table>
  <tr>
  </tr>
<% @budgets.each do |budget| %>
  <tr>
    <td>Descripton: <%= budget.budget_name %></td>
    <td>Type: <%= budget.budget_type %></td>
    <td>Amount: <%= number_to_currency(budget.budget_amount) %></td>
    <td>Date: <%= budget.entry_date %></td>
    <td>Entered by: <%= @current_user.login %></td>
    <td>Entered by: <%= budget.user.login %></td> 
    <td>User_id: <%= @my_id %></td>   
    <td><%= link_to 'Show', budget %></td>
    <td><%= link_to 'Edit', edit_budget_path(budget) %></td>
    <td><%= link_to 'Destroy', budget, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
  <tr>
<% end %>
    <td> </td>
    <td> </td>
    <td>Total: <%= number_to_currency(@my_total) %> </td>
  </tr>
  <tr>
    <td> </td>
    <td> </td>
    <td>Total: <%= number_to_currency(@bills_total) %> </td>
  </tr>
</table>

<br />

<%= link_to 'New budget', new_budget_path %>